package run.bottle.shiro.controller;

import cn.hutool.http.HttpStatus;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import run.bottle.shiro.model.dto.Result;

@RestController
public class IndexController {

    @ApiOperation("未授权")
    @GetMapping(path = "/unauthorized/{message}")
    public Result unauthorized(@PathVariable String message){
        return Result.error(HttpStatus.HTTP_UNAUTHORIZED, message);
    }

}
